package org.example.sms.controller;

import org.example.core.utils.R;
import org.example.sms.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 小杰_cc
 * @version 1.0
 */

@RestController
@RequestMapping("/sms/front")
public class SmsController {

    @Autowired
    private SmsService smsService;

    @GetMapping("/sendCode")
    public R<?> sendSmsCode(@RequestParam("phone") String phone, @RequestParam("code") String code){
        smsService.sendCode(phone, code);
        return R.ok();
    }
}
